LANG=zh_CN
export LANG

JAVA_HOME="/usr/java5"
LCBMI_HOME="/lcims/zhaigx/lcbmi80"
LCBMI_LOG="${LCBMI_HOME}/log"
LCBMI_TARGET="lcbmi80"

for pid in `ps -ef | grep "${LCBMI_TARGET}" | grep -v "grep" | awk ' { print $2 } '`
do
kill -9 $pid;
echo $pid;
done

#COMMON_LIB="${LCBMI_HOME}/lib/common/jakarta-oro-2.0.6.jar:${LCBMI_HOME}/lib/common/jdom.jar:${LCBMI_HOME}/lib/common/ldapjdk.jar:${LCBMI_HOME}/lib/common/soap.jar:${LCBMI_HOME}/lib/common/xercesImpl.jar:${LCBMI_HOME}/lib/common/jconn2.jar:${LCBMI_HOME}/lib/common/jConnect.jar:${LCBMI_HOME}/lib/commons-httpclient-3.1.jar:${LCBMI_HOME}/lib/commons-codec.jar"
#MINA_LIB="${LCBMI_HOME}/lib/mina/commons-lang-2.4.jar:${LCBMI_HOME}/lib/mina/commons-logging-1.0.3.jar:${LCBMI_HOME}/lib/mina/javassist-3.7.ga.jar:${LCBMI_HOME}/lib/mina/jzlib-1.0.7.jar:${LCBMI_HOME}/lib/mina/log4j-1.2.16.jar:${LCBMI_HOME}/lib/mina/log4j-over-slf4j-1.6.0.jar:${LCBMI_HOME}/lib/mina/mina-core-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-example-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-filter-compression-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-integration-beans-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-integration-jmx-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-integration-ognl-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-integration-xbean-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-statemachine-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-transport-apr-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/mina-transport-serial-2.0.0-RC1.jar:${LCBMI_HOME}/lib/mina/ognl-2.7.2.jar:${LCBMI_HOME}/lib/mina/rxtx-2.1.7.jar:${LCBMI_HOME}/lib/mina/slf4j-api-1.6.0.jar:${LCBMI_HOME}/lib/mina/slf4j-jdk14-1.6.0.jar:${LCBMI_HOME}/lib/mina/slf4j-log4j12-1.6.0.jar:${LCBMI_HOME}/lib/mina/spring-2.5.5.jar:${LCBMI_HOME}/lib/mina/tomcat-apr-5.5.23.jar:${LCBMI_HOME}/lib/mina/xbean-spring-3.4.3.jar"
#XML_LIB="${LCBMI_HOME}/lib/xml/dom4j-1.6.jar"
#HIBERNATE_LIB="${LCBMI_HOME}/lib/hibernate/commons-dbcp.jar:${LCBMI_HOME}/lib/hibernate/commons-pool.jar"

CLASSPATH=":.:..:${LCBMI_HOME}/classes"
find ${LCBMI_HOME}/lib -name '*.jar' > ${LCBMI_HOME}/sh/jars.list
while read line
do
	CLASSPATH="${CLASSPATH}:$line"
done < ${LCBMI_HOME}/sh/jars.list

cd ${LCBMI_HOME}

#nohup ${JAVA_HOME}/bin/java -Dtarget=${LCBMI_TARGET} -Dsystemconfig=${LCBMI_HOME}/new-config/systemconfig.xml -Duser.home=${LCBMI_HOME} -Xms32m -Xmx200m -classpath ${CLASSPATH} apiwork.Startup > ${LCBMI_HOME}/sh/lcbmi.log 2>&1 &
#nohup ${JAVA_HOME}/bin/java -noverify -javaagent:lib/jreloader.jar -Djreloader.dirs=${LCBMI_HOME}/classes -Dtarget=${LCBMI_TARGET} -Dsystemconfig=${LCBMI_HOME}/new-config/systemconfig.xml -Duser.home=${LCBMI_HOME} -Xms32m -Xmx200m -classpath ${CLASSPATH} apiwork.Startup &
nohup ${JAVA_HOME}/bin/java -Dtarget=${LCBMI_TARGET} -Dsystemconfig=${LCBMI_HOME}/new-config/systemconfig.xml -Duser.home=${LCBMI_HOME} -Xms32m -Xmx200m -classpath ${CLASSPATH} apiwork.Startup &
#> ${LCBMI_HOME}/sh/lcbmi.log 2>&1 &
